﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<Color x:Key="AppBackgroundColor">#5C4B51</Color>
    <Color x:Key="AppForegroundColor">#FFFFFF</Color>

    <Color x:Key="AppAccentColor1">#F3B562</Color>
    <Color x:Key="AppAccentColor2">#F06060</Color>
    <Color x:Key="AppAccentColor3">#8CBEB2</Color>
    <Color x:Key="AppAccentColor4">#F2EBBF</Color>

    <SolidColorBrush x:Key="AppBackgroundBrush" Color="{StaticResource AppBackgroundColor}"/>
    <SolidColorBrush x:Key="AppForegroundBrush" Color="{StaticResource AppForegroundColor}"/>

    <SolidColorBrush x:Key="AppAccentBrush1" Color="{StaticResource AppAccentColor1}"/>
    <SolidColorBrush x:Key="AppAccentBrush2" Color="{StaticResource AppAccentColor2}"/>
    <SolidColorBrush x:Key="AppAccentBrush3" Color="{StaticResource AppAccentColor3}"/>
    <SolidColorBrush x:Key="AppAccentBrush4" Color="{StaticResource AppAccentColor4}"/>

    <BitmapImage x:Key="AppImageButtonBasecircle" UriSource="/Assets/AppBar/basecircle.png"></BitmapImage>
    <BitmapImage x:Key="AppImageButtonPressedBasecircle" UriSource="/Assets/AppBar/basecircle (pressed).png"></BitmapImage>
    <BitmapImage x:Key="AppImageButtonDisabledBasecircle" UriSource="/Assets/AppBar/basecircle (disabled).png"></BitmapImage>

    <Style x:Key="AppImageButtonStyle" TargetType="Button">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
		<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
		<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
		<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
		<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
        <Setter Property="Margin" Value="0"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid Background="Transparent">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source" Storyboard.TargetName="ButtonBasecircle">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppImageButtonPressedBasecircle}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ButtonDisabledBasecircle">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
                        <Image x:Name="ButtonBasecircle" Source="{StaticResource AppImageButtonBasecircle}"/>
                        <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}"/>
                        <Image x:Name="ButtonDisabledBasecircle" Source="{StaticResource AppImageButtonDisabledBasecircle}" Visibility="Collapsed"/>
                    </Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>